Using the Symbol Browser

In the Project Editor, choose Tools > Symbol Browser. The Symbol Browser appears.

2. Take a look at the Language drop-down. The SNiFF+ Ada Parser is actually a Ada 95 parser that understands the Ada 83 subset of the language. For all Ada projects, the language string displayed in the drop-down is Ada9X.
3. Since we are interested in browsing all three projects in the Project Tree, let's checkmark them at this time. To checkmark all three projects quickly, right click anywhere in the Project Tree and choose Context menu > Select from All Projects.
4. Look at the entries in the Symbol Type drop-down:

   The following symbols are listed:

   - const
   - enum
   - enum item
   - object
   - package
   - pkg object
   - pkg subprog (body and def)
   - record
   - subprog (for functions, procedures and entries)
   - typedef
5. Choose the various entries in the Symbol Type drop-down and see what happens. By selecting the Signature check-box, you can see in which files the symbols appear. Also, information about object types, subprogram parameters and return types will be displayed.
   Note that as Ada is not case sensitive, all symbol names appear converted to upper case.
   Also note that (non-package) objects and constants are not present in this project, resulting in an empty Symbol List when you select them. Named number TABLE_SIZE of package ROOM can be found among package objects, having the type _NamedNumber_.
   Choose subprog def. All package subprograms defined inside package specifications in the project are listed in the Symbol List.
   Choose All Symbols.
6. Scroll down the list till you get to

sd REPORT_STATE and double-click onit.
A Source Editor appears and the file room.ads is loaded into it. As you have just found out, double-clicking a symbol in the Symbol List opens a Source Editor and loads the file in which the symbol appears. The cursor is automatically positioned to the symbol in the file.

In the next chapter, we will use

REPORT_STATE to show how you can perform cross referencing in SNiFF+.